package org.example;


import bean.Order;
import bean.Teacher;
import bean.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import service.UserService;

public class Main {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring2.xml");
//        User user = (User) context.getBean("user");
//        user.setName("肖炯");
//        user.setPassword("21045226");
//        System.out.println(user);
//        Teacher teacher = (Teacher) context.getBean("teacher");
//        System.out.println(teacher);
        UserService userService = (UserService) context.getBean("userService");
        userService.login();
    }
}